import axios from 'axios';

export default {
    
    // 登录
    login(url, method, data) {
        return new Promise((resolve, reject) => {

            axios({
                url: "/api" + url,
                method: method,
                data: data || {},
                headers: {
                    contentType: "application/json",
                },
            }).then(res => {
                resolve(res);
            }).catch(err => {
                reject(err);
            })
        })
    }

}